/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package domaci3.controller;

import domaci3.model.DvostrukoSpregnutaLista;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Vector;
import javax.swing.DefaultComboBoxModel;

/**
 *
 * @author Ilija
 */
public class MojOsluskivac2 implements ActionListener{

    Controller c;
    
    MojOsluskivac2 (Controller c){
        this.c = c;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        
        c.view.getJPanel3().setVisible(true);
        Vector comboBoxItems = c.lista.prikaziSve();
        
        if (comboBoxItems != null){
            DefaultComboBoxModel model = new DefaultComboBoxModel(comboBoxItems);
            c.view.getComboBox1().setModel(model);
        }

      }
    
    
}
